//
//  YSCustomerServicePhoneView.m
//  Yueshi
//
//  Created by yueshi－mac1 on 16/1/22.
//  Copyright © 2016年 悦食中国. All rights reserved.
//

#import "YSCustomerServicePhoneView.h"
@interface YSCustomerServicePhoneView()
@property (weak, nonatomic) IBOutlet UIView *contentView;
@property (weak, nonatomic) IBOutlet UILabel *phoneLabel;
@property (weak, nonatomic) IBOutlet UILabel *workingTimeLabel;

@end

@implementation YSCustomerServicePhoneView
+ (instancetype)instance{
    return [[[NSBundle mainBundle]loadNibNamed:@"YSCustomerServicePhoneView" owner:nil options:nil] lastObject];
}

- (void)awakeFromNib{
    [super awakeFromNib];
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onClick)];
    self.contentView.userInteractionEnabled = YES;
    [self.contentView addGestureRecognizer:tap];
}

- (void)setPhone:(NSString *)phone{
    _phone = phone;
    self.phoneLabel.text = phone;
}

- (void)setWorkingTime:(NSString *)workingTime{
    _workingTime = workingTime;
    self.workingTimeLabel.text = workingTime;
}

- (void)onClick{
    if (self.clickAction) {
        self.clickAction();
    }
}

@end
